﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Domain.Services;

namespace YaAppoint.Appointments.Schedules
{
    public class ScheduleManager(IRepository<Schedule,Guid> scheduleRepository): DomainService
    {
        private readonly IRepository<Schedule, Guid> _scheduleRepository = scheduleRepository;

        /// <summary>
        /// 当前编号是否存在
        /// </summary>
        public async Task<List<Schedule>> IsCodeNotExist(string code)
        {
            return await _scheduleRepository.GetListAsync(x => x.Code.Equals(code));
        }

    }
}
